/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jfonia.actions;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import org.jfonia.images.ImageConstants;
import org.jfonia.images.ScaledImageIcon;
import org.jfonia.language.DescriptionConstants;
import org.jfonia.language.LabelConstants;
import org.jfonia.language.LanguageResource;
import org.jfonia.model.Sequence;
import org.jfonia.model.Staff;
import org.jfonia.model.elements.Lyric;
import org.jfonia.view.main.Project;

/**
 *
 * @author Rik Bauwens
 */
public class CreateLyricsPartAction extends AbstractAction
{
        protected CreateLyricsPartAction(int iconMaxSize)
        {
                super(LanguageResource.getInstance().getLabel(LabelConstants.LYRICS_PART),
                      new ScaledImageIcon(ImageConstants.LYRICS_PART,
                      LanguageResource.getInstance().getDescription(DescriptionConstants.LYRICS_PART))
                      .setMaximumSide(iconMaxSize).getImageIcon());
        }

        public void actionPerformed(ActionEvent e)
        {
                Staff lyricStaff = new Staff();
                Sequence<Lyric> lyricSequence = new Sequence<Lyric>(Lyric.class);
                lyricStaff.addSequence(lyricSequence);
                lyricSequence.add(new Lyric(1).setLyric("test"));
                Project.getInstance().getCurrentLeadSheet().getStaffCollection().addStaff(lyricStaff);
        }
}